-
Notifications
You must be signed in to change notification settings - Fork 764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix] fix pytorch-paddle mapping index generate #6463
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6463.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
@sunzhongkai588 请看预览,业已修复 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
要不要把新增的几篇md文档去掉?这些需要 @zhwesky2010 review 吧
paddle.nn.LogSigmoid(name=None) | ||
``` | ||
|
||
两者功能一致,参数完全一致。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是不是torch可以输入参数,paddle不能输入。torch参数更多?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这几个虽然 torch 可以输入参数,但是参数并不起到任何作用,我倾向于其算是无参数的情况
### [torch.nn.Sigmoid](https://pytorch.org/docs/stable/generated/torch.nn.Sigmoid.html) | ||
|
||
```python | ||
torch.nn.Sigmoid(*args, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是不是torch可以输入参数,paddle不能输入。torch参数更多?
### [torch.nn.Softsign](https://pytorch.org/docs/stable/generated/torch.nn.Softsign.html) | ||
|
||
```python | ||
torch.nn.Softsign(*args, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是不是torch可以输入参数,paddle不能输入。torch参数更多?
### [torch.nn.Tanh](https://pytorch.org/docs/stable/generated/torch.nn.Tanh.html) | ||
|
||
```python | ||
torch.nn.Tanh(*args, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是不是torch可以输入参数,paddle不能输入。torch参数更多?
### [torch.nn.Tanhshrink](https://pytorch.org/docs/stable/generated/torch.nn.Tanhshrink.html) | ||
|
||
```python | ||
torch.nn.Tanhshrink(*args, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是不是torch可以输入参数,paddle不能输入。torch参数更多?
| (torch.nn.functional.multilabel_margin_loss)[https://pytorch.org/docs/stable/generated/torch.nn.functional.multilabel_margin_loss.html#torch.nn.functional.multilabel_margin_loss] | 功能缺失 | | ||
| (torch.nn.functional.ctc_loss)[https://pytorch.org/docs/stable/generated/torch.nn.functional.ctc_loss.html#torch.nn.functional.ctc_loss] | 功能缺失,torch 的 log_softmax+ctc_loss 相当于 paddle 的 ctc_loss | | ||
| NOT-IMPLEMENTED-ITEM(`torch.nn.functional.multilabel_margin_loss`, https://pytorch.org/docs/stable/generated/torch.nn.functional.multilabel_margin_loss.html#torch.nn.functional.multilabel_margin_loss) | | ||
| NOT-IMPLEMENTED-ITEM(`torch.nn.functional.ctc_loss`, https://pytorch.org/docs/stable/generated/torch.nn.functional.ctc_loss.html#torch.nn.functional.ctc_loss) | | ||
|
||
***持续更新...*** | ||
|
||
## torch.Tensor.XX API 映射列表 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些删掉的原因是?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
因为上面几行是手动维护的,改成了自动维护的格式;因为其他的功能缺失没有原因描述,所以这里把原因也删除了
@RedContritio /docs/docs/guides/model_convert/pytorch_api_mapping_cn.md 这个文件是不是也可以顺带删除了,有些误导性 |
@@ -1,4 +1,4 @@ | |||
## [ 仅参数名不一致 ]torch.Tensor.split_size_or_sections | |||
## [ 仅参数名不一致 ]torch.Tensor.vsplit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [Fix] dsplit/vsplit 映射文档中书写错误 #6464
vsplit.md和matrix_exp.md,在上面这个PR里改了,可以merge下develop,去掉这部分
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已 merge
好的已删除 |
这部分是因为这几个 api 在目录里提及了,所以需要有对应的映射描述文件。 |
@@ -1537,7 +1230,7 @@ | |||
| ----- | ----------- | ----------------- | --- | | |||
| REFERENCE-MAPPING-ITEM(`torch.linalg.svd`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/linalg/torch.linalg.svd.md) | | |||
| REFERENCE-MAPPING-ITEM(`torch.linalg.matrix_power`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/linalg/torch.linalg.matrix_power.md) | | |||
| REFERENCE-MAPPING-ITEM(`torch.linalg.matrix_exp`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/linalg/torch.linalg.matrix_exp.md) | | |||
| REFERENCE-MAPPING-ITEM(`torch.linalg.matrix_power`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/linalg/torch.linalg.matrix_exp.md) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
后面这个链接看起来是错的,torch.linalg.matrix_exp.md?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已更新,列表项改回了 torch.linalg.matrix_exp
@@ -0,0 +1,15 @@ | |||
## [ 参数完全一致 ] torch.nn.AdaptiveAvgPool3d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是 paddle参数更多 吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
|
||
***持续更新...*** | ||
|
||
## torch.Tensor.XX API 映射列表 | ||
梳理了`torch.Tensor.XX`类 API 的 PyTorch-PaddlePaddle API 映射列表。 | ||
|
||
| 序号 | PyTorch API | PaddlePaddle API | 备注 | | ||
|-----| --- | --- | --- | | ||
| 1 | [torch.Tensor.device](https://pytorch.org/docs/stable/generated/torch.Tensor.device.html) | [paddle.Tensor.place](https://www.paddlepaddle.org.cn/documentation/docs/api/paddle/Tensor_cn.html#place) | 功能一致, 无参数 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.device.md) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里删除了上百个 torch.Tensor.*
的原因是?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的是之前其他人 pr 的时候,错误地将生成结果和源文件复制到了一起,产生的错误。 相关PR
### [paddle.nn.AdaptiveAvgPool2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/AdaptiveAvgPool2D_cn.html#adaptiveavgpool2d) | ||
|
||
```python | ||
paddle.nn.AdaptiveAvgPool2D(output_size, data_format='NCHW', name=None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个不是paddle参数更多?
@RedContritio 写文档需要尤其细心点,可以先自己整体自查一遍 |
好的了解,关于 torch 支持 |
@@ -0,0 +1,15 @@ | |||
## [ 参数完全一致 ] torch.nn.LogSigmoid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果不生效,是不是叫 无参数 更好
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
确实。无参数的 4 个 api 已修改
@@ -0,0 +1,20 @@ | |||
## [ 参数完全一致 ] torch.nn.AdaptiveAvgPool2d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
仅 paddle 参数更多
@@ -0,0 +1,15 @@ | |||
## [ 参数完全一致 ] torch.nn.Tanh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个也是 无参数 吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
建议那几个无参数的,后面把签名也改成无参数的形式,还是要以实际代码来,不用一定按文档
好的了解,后续做对齐和检查的时候处理这种类型的问题。 |
* fix errors * format mapping index * fix manual item * fix * add 2 mapping doc * add check and exit * add check in gendoc.sh * fix * fix root dir * update some api mapping doc * add mapping docs * remove unused mapping index file * fix unpaired mapping item * fix doc * update * update * update
* fix errors * format mapping index * fix manual item * fix * add 2 mapping doc * add check and exit * add check in gendoc.sh * fix * fix root dir * update some api mapping doc * add mapping docs * remove unused mapping index file * fix unpaired mapping item * fix doc * update * update * update
* [Fix] fix pytorch-paddle mapping index generate (#6463) * fix errors * format mapping index * fix manual item * fix * add 2 mapping doc * add check and exit * add check in gendoc.sh * fix * fix root dir * update some api mapping doc * add mapping docs * remove unused mapping index file * fix unpaired mapping item * fix doc * update * update * update * add missing doc
No description provided.